﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Control;
using Model;

namespace WCF
{
    public class CustomerService : ICustomerService
    {
        private CustomerController cusCTR;

        public CustomerService()
        {
            cusCTR = new CustomerController();
        }

        public void CreateCustomer(string name, string address, string phoneNo, string email, string type)
        {
            cusCTR.CreateCustomer(name, address, phoneNo, email, type);
        }

        public void DeleteCustomer(string phoneNo)
        {
            cusCTR.DeleteCustomer(phoneNo);
        }

        public List<Customer> FindAllCustomers()
        {
            return cusCTR.FindAllCustomers();
        }

        public Customer FindCustomer(string phoneNo)
        {
            return cusCTR.FindCustomer(phoneNo);
        }
    }
}
